package com.pan.note.dao;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 聊天记录实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("ChatInfo")
public class ChatInfoDao {
    //id
    @TableId(value = "id")
    private String id;
    //发送者
    @TableField(value = "sender")
    private String sender;
    //接收者
    @TableField(value = "receiver")
    private String receiver;
    //聊天记录
    @TableField(value = "chat_info")
    private String chatInfo;
    //是否已读
    @TableField(value = "chat_check")
    private Boolean chatCheck;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
